Server recording and client playback of computer network characteristics

ABSTRACT

A system and a method for server recording and client playback of computer network characteristics. In general, the network simulation system of the present invention includes a recording module that resides on a server and records and stores the network characteristics associated with networks sessions in a data collector file. The system also includes playback module that resides on a client receives the data collector file and plays back the data collector file upon request. The data collector file includes a log file, which is used to store initial request data, and a data file, which is used to store data other than the initial request data. The method of the present invention includes recording computer network characteristics on a recording server and playing back the recording on a client to the same or another server. The recording method of the present invention includes using a global filter residing on the server to record the network characteristics and storing the recording in a data collector file. The playback method includes receiving a data collector file containing recorded network characteristics recorded on a server and playing back the data collector file to simulate the characteristics of real-world network sessions.

TECHNICAL FIELD

The present invention relates in general to computer network simulationand more particularly to a system and a method for server recording andclient playback of computer network characteristics.

BACKGROUND OF THE INVENTION

Capacity planning of a server used in a server/client wide-area network(WAN) is quickly becoming more important as the use of WANs (such as theInternet) rapidly increase. WAN servers often are used by Internet sitesand must be able to efficiently handle the anticipated requests to thesite. Capacity planning helps predict if and when system saturation willoccur by testing the maximum user load and speed of the target server.Thus, accurate and realistic testing a server is a crucial foundationfor building a network system.

A common approach to testing a server is to perform browser or clientrecording of a browser session. Recording of a browser session generallyinvolves starting a browser session and making requests to a server. Allof the outgoing HyperText Transfer Protocol (HTTP) messages are recordedand the status of the request and the contents of what was requestedwill be displayed. One problem, however, with client recording of abrowser session is that it does not accurately simulate the real-worldcase where a plurality of clients are sending requests to the server.Although several copies of the single browser session may be played backsimultaneously to simulate a plurality of clients, this can lead to ashut down of the operating system due to thread limitations well beforea realistic number of clients can be simulated. More importantly, thetiming of a client recorded single browser session is not accurate orrealistic because only copies of a single browser session are beingplayed back. In addition, critical server information such as the numberof open sockets, when the sockets are closed, the state of a request(i.e., where a HTTP server is with regard to processing the request),when the HTTP server began to process the request and information andpossible storage of a request that caused the server or HTTP service toshutdown prior to request processing are not available. Thus, clientrecording completely fails to capture a great deal of serverinformation, including the important server information listed above.

Accordingly, there exists a need for a network simulation system thattracks critical server information and provides accurate and realisticsimulation of real-world network sessions. In addition, this networksimulation system would realistically simulate a large number of clientssending requests to the server, capture important information aboutthose requests and provide accurate timing of requests made to theserver. Whatever the merits of the above-mentioned systems and methods,they do not achieve the benefits of the present invention.

SUMMARY OF THE INVENTION

To overcome the limitations in the prior art as described above andother limitations that will become apparent upon reading andunderstanding the present specification, the present invention is asystem and method for recording and playing back computer networkcharacteristics. In particular, the present invention records thenetwork characteristics on a server and plays back the recordedcharacteristics on a client. This arrangement provides accurate andrealistic simulation of computer network characteristics that can beused for a variety of purposes (such as capacity planning and networktroubleshooting). The present invention allows the recordedcharacteristics to be scaled to provide intensive testing of thecapacity and resource limits of a network server. Further, the presentinvention permits a recording server to record multiple clients andplayback that recording on a single machine (in order to simulatemultiple clients).

The present invention also provides a record of network characteristicsthat are not captured in server log files (such as bad requests from aclient). The present invention collects more accurately the networkcharacteristics being receive by a server and provides more data onthese network characteristics than other systems and techniques. Thisnetwork characteristics data may be used, for example, to analyzecustomer usage patterns and the flow of requests to a network system(such as a World Wide Web site). By providing server recording ofnetwork characteristics, the present invention provides more accurate,detailed and realistic simulation of a real-world network and captures agreater amount of data than other systems and techniques (such as thosesystems and techniques that record on a client).

The system of the present invention generally includes a recordingmodule that resides on a server and records and stores the networkcharacteristics associated with networks sessions in a data collectorfile. A playback module that resides on a client receives the datacollector file and plays back the data collector file upon request. Thedata collector file, which may be played back faster or slower tosimulate more intensive or less intensive network sessioncharacteristics, includes a log file and a data file. The log file isused to store header information received from a client during recordingand the data file is used to store other data. The recording module alsoincludes a registration module, for registering the recording modulewith the server operating system, a tracking module, for tracking users,and a log restriction/rolling module for taking action to prevent therecorded data from filling the available storage space on a server. Inparticular, log rolling allows a user to preserve data by movingcaptured data to another machine without any loss of current data beingreceived by the server.

The present invention also includes a method for recording computernetwork characteristics on a server and playing back thosecharacteristics on a client. The recording method of the presentinvention includes using a global filter residing on the server torecord the network characteristics. Recorded information is stored in adata collector file that includes a log file and a data file. Theplayback method includes receiving a data collector file containingrecorded network characteristics and playing back the data collectorfile to simulate the characteristics of a real-world network session.Further, the playback method includes varying the playback speed andmultiplying the number of recorded users (or repeating the samerecording a number of times if only one user was recorded) to vary theintensity of the recorded network characteristics.

Other aspects and advantages of the present invention as well as a morecomplete understanding thereof will become apparent from the followingdetailed description, taken in conjunction with the accompanyingdrawings, illustrating by way of example the principles of theinvention. Moreover, it is intended that the scope of the invention belimited by the claims and not by the preceding summary or the followingdetailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention can be further understood by reference to thefollowing description and attached drawings that illustrate thepreferred embodiments. Other features and advantages will be apparentfrom the following detailed description of the invention, taken inconjunction with the accompanying drawings, which illustrate, by way ofexample, the principles of the present invention.

Referring now to the drawings in which like reference numbers representcorresponding parts throughout:

FIG. 1 is a block diagram illustrating an apparatus for carrying out theinvention.

FIG. 2 is an overall block diagram of two computer networksincorporating the network simulation system of the present invention.

FIG. 3 is a general block-flow diagram illustrating the networksimulation system shown in FIG. 2.

FIG. 4 is a detailed block diagram illustrating the record module of thenetwork simulation system shown in FIG. 3.

FIG. 5 is a block diagram illustrating an example implementation of theglobal filter shown in FIG. 4.

FIG. 6 is a detailed flow diagram of the operation of the record moduleshown in FIG. 4.

FIG. 7 is a detailed block diagram illustrating the playback module ofthe network simulation system shown in FIG. 3.

FIG. 8 is a detailed flow diagram of the operation of the playbackmodule shown in FIG. 7.

DETAILED DESCRIPTION OF THE INVENTION

In the following description of the invention, reference is made to theaccompanying drawings, which form a part thereof, and in which is shownby way of illustration a specific example whereby the invention may bepracticed. It is to be understood that other embodiments may be utilizedand structural changes may be made without departing from the scope ofthe present invention.

I. Introduction

The present invention is embodied in a system and method for recordingcomputer network characteristics of network sessions on a server andplaying back the recording on a single client machine or several clientmachines. Unlike existing network simulation systems that usemanufactured static scripts that are continuously looped, the presentinvention provides an actual real-world dynamic recording of networksessions in a production environment that may be played back in acontrolled test environment. The present invention accurately simulatesthe chaos and other characteristics that are present in real-worldnetwork sessions and provides a more detailed and realistic simulationin which to test a server.

II. Exemplary Operating Environment

FIG. 1 and the following discussion are intended to provide a brief,general description of a suitable computing environment in which theinvention may be implemented. Although not required, the invention willbe described in the general context of computer-executable instructions,such as program modules, being executed by a computer. Generally,program modules include routines, programs, objects, components, datastructures, etc. that perform particular tasks or implement particularabstract data types. Moreover, those skilled in the art will appreciatethat the invention may be practiced with a variety of computer systemconfigurations, including personal computers, server computers,hand-held devices, multiprocessor systems, microprocessor-based orprogrammable consumer electronics, network PCs, minicomputers, mainframecomputers, and the like. The invention may also be practiced indistributed computing environments where tasks are performed by remoteprocessing devices that are linked through a communications network. Ina distributed computing environment, program modules may be located onboth local and remote computer storage media including memory storagedevices.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general-purpose computing device in the form of aconventional personal computer 100, including a processing unit 102, asystem memory 104, and a system bus 106 that couples various systemcomponents including the system memory 104 to the processing unit 102.The system bus 106 may be any of several types of bus structuresincluding a memory bus or memory controller, a peripheral bus, and alocal bus using any of a variety of bus architectures. The system memoryincludes read only memory (ROM) 110 and random access memory (RAM) 112.A basic input/output system (BIOS) 114, containing the basic routinesthat help to transfer information between elements within the personalcomputer 100, such as during start-up, is stored in ROM 110. Thepersonal computer 100 further includes a hard disk drive 116 for readingfrom and writing to a hard disk, not shown, a magnetic disk drive 118for reading from or writing to a removable magnetic disk 120, and anoptical disk drive 122 for reading from or writing to a removableoptical disk 124 such as a CD-ROM or other optical media. The hard diskdrive 116, magnetic disk drive 128 and optical disk drive 122 areconnected to the system bus 106 by a hard disk drive interface 126, amagnetic disk drive interface 128 and an optical disk drive interface130, respectively. The drives and their associated computer-readablemedia provide nonvolatile storage of computer readable instructions,data structures, program modules and other data for the personalcomputer 100.

Although the exemplary environment described herein employs a hard disk,a removable magnetic disk 120 and a removable optical disk 124, itshould be appreciated by those skilled in the art that other types ofcomputer readable media that can store data that is accessible by acomputer, such as magnetic cassettes, flash memory cards, digital videodisks, Bernoulli cartridges, random access memories (RAMs), read-onlymemories (ROMs), and the like, may also be used in the exemplaryoperating environment.

A number of program modules may be stored on the hard disk, magneticdisk 120, optical disk 124, ROM 110 or RAM 112, including an operatingsystem 132, one or more application programs 134, other program modules136 and program data 138. A user (not shown) may enter commands andinformation into the personal computer 100 through input devices such asa keyboard 140 and a pointing device 142. Other input devices (notshown) including, for example, a microphone, joystick, game pad,satellite dish, camera, scanner, or the like may be connected to thepersonal computer 100. These other input devices are often connected tothe processing unit 102 through a serial port interface 144 that iscoupled to the system bus 106, but may be connected by other interfaces,such as a parallel port, a game port or a universal serial bus (USB). Amonitor 146 or other type of display device is also connected to thesystem bus 106 via an interface, such as a video adapter 148. Inaddition to the monitor 146, personal computers typically include otherperipheral output devices (not shown), such as speakers and printers.

The personal computer 100 may operate in a networked environment usinglogical connections to one or more remote computers, such as a remotecomputer 150. The remote computer 150 may be another personal computer,a server, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the personal computer 100, although only a memory storagedevice 152 has been illustrated in FIG. 1. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 154 and a widearea network (WAN) 156. Such networking environments are commonplace inoffices, enterprise-wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the personal computer 100 isconnected to the local network 154 through a network interface oradapter 158. When used in a WAN networking environment, the personalcomputer 100 typically includes a modem 160 or other means forestablishing communications over the wide area network 156, such as theInternet. The modem 160, which may be internal or external, is connectedto the system bus 106 via the serial port interface 144. In a networkedenvironment, program modules depicted relative to the personal computer100, or portions thereof, may be stored in the remote memory storagedevice 152. It will be appreciated that the network connections shownare exemplary and other means of establishing a communications linkbetween the computers may be used.

III. General Overvi w

As shown in FIGS. 2–8 for the purposes of illustration, the inventionmay be embodied in a system and a method for a system for recordingnetwork sessions on a server and playing back the recording on a clientmachine. The recording includes detailed information about the networksession (such as timing, user and socket information) that provides anaccurate and realistic network simulation that is not available withsimulation systems that use client recording and manufactured staticscripts. The dynamic real-world recording of network sessions created bythe present invention may be played back in a controlled testingenvironment to test, for example, the capacity and performance of aserver prior to its actual deployment in a production environment.

In addition to capacity planning, the present invention has other usesand applications in a networking environment. By way of example and notlimitation, the present invention may be used to test an operatingsystem (such as Internet Information Server (IIS)). This testing may beperformed by installing the present invention on a server, recordingdata and playing back the recorded data to reproduce any errorsencountered. The present invention may also be used to ensure that a newversion of an operating system will operate properly prior to actualuse. This would provide a customer with a confidence that the customer'snetwork would run smoothly using the new version. For example, if acustomer is using version 3.0 of an operating system and would like toupgrade to version 5.0, the present invention may be used to record liverequests on the customer's network that is running version 3.0, setup amirrored network that is running version 5.0, and playback the recordingon the mirrored network to verify that version 5.0 would be stable (andbe, for example, faster with better memory management). The presentinvention may also be used to migrate a user from one operating systemto another using a technique similar to the technique mentioned above.Moreover, the present invention may be used to stress test a network sothat the capabilities and limits of a network system may be determined.

The data files created by the record module of the present invention mayalso be used to perform detailed analysis. Because the data filescreated by the record module capture detailed information about thenetwork (such as network traffic), significant aggregate information maybe gained by analyzing these data files.

FIG. 2 is an overall block diagram of two computer networksincorporating the network simulation system 200 of the presentinvention. The computer networks illustrated are only examples ofseveral types of computer networks that could incorporate the networksimulation system of the present invention. In general, the networksimulation system of the present invention includes both recording on aserver and a playback on a client.

Server recording preferably occurs in a production environment on a widearea network (WAN) 204. The WAN 204 includes a recording server 208having server operating system and connected to a network 216 via anetwork connection 224. In a production environment, real networksessions and requests arriving at the recording server 208 may berecorded. A plurality of WAN client machines (or clients) 232 are alsoconnected to the network 216 via their respective network connections240. At any given time, the number of WAN clients 232 connected to therecording server 208 over the network 216 may vary. For example, therecording server 208 may be a Web server that has users accessing thesite over the Internet. The number of users accessing the site may rangefrom zero to the maximum number of connections that the Web server canaccommodate.

Server recording in the present invention is performed by a recordmodule 244. The record module 244 resides on the recording server 208and records requests transmitted by a WAN client 232 to the recordingserver 208. These requests generally are to access a page contained onthe recording server 208. In general, the record module 244 recordsrequest made by the WAN client 232 and stores these requests in a datacollector file.

Client playback of a recording made by the recording server 208preferably occurs in a test environment on a local area network (LAN)248. The LAN 248 includes a testing server (a server being tested) 256that is in network communication with LAN clients 264. In a testenvironment, the realistic simulation provided by the network simulationsystem 200 may be used to test and tune the testing server 256 toachieve optimal performance prior to introducing the testing server 256into a production environment. Moreover, the network simulation system200 may be used to test additional software that runs on the testingserver 256 or custom applications written for the testing server 256.Although three LAN clients 264 are illustrated, the number of LAN clientmay be one or more. A playback machine 272 is in communication with theLAN clients 264. The playback machine 272 may be one of the LAN clients264 or a separate machine having a processor.

A playback module 280 resides on the playback machine 272 and performsthe playback of a recording made by the record module 244 of the presentinvention. In particular, the playback module 280 reads individualrecords from a data collector file (containing requests recorded by therecord module 244) and sends these records to the LAN clients 264. Asexplained in detail below, each individual record is assigned to a LANclient 264. Each LAN client 264 then transmits a recorded request to thetesting server 256, thereby realistically and accurately simulating aproduction environment. In addition, each LAN client 264 is capable ofplaying back a recording made by the record module 244 that includes,for example, requests from multiple LAN client 264. Thus, each LANclient 264 is capable of simulating multiple recorded client duringplayback.

FIG. 3 is a general block-flow diagram illustrating the networksimulation system shown in FIG. 2. In general, network simulation systemrecords network requests to a server within a production environment,stores the requests in memory and plays the recorded requests back on aclient in a testing environment. Specifically, the network simulationsystem 200 of the present invention includes a recording server 208 anda data collector file 308 within a production environment 316. Theproduction environment is preferably one in which the recording server208 receives real-world requests from a plurality of outside users.Although a preferred embodiment the recording server is in a productionenvironment and records real-world requests, alternate embodiments maybe implemented.

The network simulation system 200 of the present invention also includesa playback machine 272, reading data recorded by the recording server208, at least one client 264, for sending requests to a testing server256, and the testing server 256, for processing the requests sent by theclient 264. These machines occupy a testing environment 348 whereby thetesting server 256 may be tested and evaluated. The data (such asperformance and capacity data) collected during the simulation testingof the testing server 256 may be sent for further processing andinterpretation (box 356).

The record module 244 resides on the recording server 208 and recordsrequests that are received by the recording server 208 (box 364). Theserequests are stored (box 372) by the record module 244 in the datacollector file 308. The playback module 280, which resides on theplayback machine 272, read individual records (box 380) from the datacollector file 308 and sends each record (box 388) to at least oneclient 264. The client 264 sends the requests (box 396) to the testingserver 256, which receives and processes the incoming requests (box398).

IV. System and Op rational Details

As discussed above, the network simulation system of the presentinvention includes a record module, for recording network sessions on arecording server, and a playback module, for playing back the recordingon a client. The structure and operation of each of these modules willnow be discussed. Although the network simulation system of the presentinvention will be described as containing multiple modules, otherembodiments are possible that implement the described functionality ofthe invention differently. By way of example and not limitation, thesedifferences include having a different number of modules, having adifferent arrangement of modules and having different modules than thosedescribed (including having a single, monolithic module having thefunctionality of all the modules).

Record Module

Structural Overview

FIG. 4 is a detailed block diagram illustrating the record module of thenetwork simulation system shown in FIG. 3. Generally, the record module244 records requests received by the server on which the record module244 resides and stores these requests along with other information. Therecord module 244 includes a global filter 400 that captures datareceived by the server. The global filter 400 is notified of certainevents by the server operating system (such as Internet InformationServer (IIS)). For example, the server operating system listens for arequest to be received and, when it occurs, the global filter 400 isnotified and begins capturing the data from a host environment. A hostenvironment can be, for example, an operating system, a networkoperating system, an application designed to run on top of an operatingsystem, a technology that is part of an operating system (such as IIS)and a group of technologies on the computer.

In order to be notified of these events the record module 244 mustregister with the server operating system. The record module 244includes a registration module 410 that registers with the serveroperating system and informs the operating system for which events tonotify the record module 244. Further, the record module 244 includes acaching module 420 that caches the data sent by the global filter 400. Atracking module 430, which is also included in the record module 244,tracks specific network information that is needed by the networksimulation system and that the user may desire to track. For example,the tracking module 430 is capable of keeping track of which client senta certain request and at what time the request was received by theserver.

Another module included in the record module 244 is a logrestriction/rolling module 440, which is capable of limiting the size ofthe file that stores the recorded data. The log restriction/rollingmodule 440 achieves this by either deleting the file or moving the datato another machine to preserve captured information. The record module244 also includes a controller 450, for processing and providing controlto the record module 244, and a data collector file 460, for storing thedata collected by the global filter 400. The data collector file 460includes a log file 470, for storing header and tracking information,and a data file 480, for storing other types of data.

FIG. 5 is a block diagram illustrating an example implementation of theglobal filter shown in FIG. 4. In particular, the global filter 400 ofthe present is shown implemented into the server operating system on therecording server 208. The global filter 400 is implemented between aport handling module 500 of the server operating system, which scans aport 510 for incoming requests, and a processing module 520 of theserver operating system. In order to capture raw data from the port 510,the filter should be global. Other types of non-global filters may beused on a per site basis. For example, if there are multiple sitesresiding on the recording server 208 then multiple non-global filtersmay be set up for each site. However, the global filter 400 must also beused because it captures requests for all sites residing on therecording server 208. This feature is desirable because all of therequests received by the recording server 208, regardless of the sitebeing requested, should be recorded.

Operational Overview

FIG. 6 is a detailed flow diagram of the operation of the record moduleshown in FIG. 4. Prior to receiving data from the recording server, therecord module must register with the server operating system (box 600).As described below in a working example, there are several notificationsthat the record module can receive from the server operating system. Asa request arrives at the recording server, the server operating systemnotifies the record module that there is a request incoming (box 610).The global filter then captures raw data being received by the recordingserver over the port.

The record module queries a high-performance hardware counter (such as ahigh-resolution system clock) that preferably has a resolution at leastin the pico-seconds range. This type of hardware counter is foundfrequently on newer computers. This hardware counter is used to orderthe raw data within the log file by time-stamping precisely when the rawdata was received by the record module.

The record module then begins to cache the raw data from the request(box 620). Memory is allocated to create a cache and headers of therequest are cached. In general, header information from the request isto be written to the log file while the body of the request is writtento the data file without being cached. A header can be a unit ofinformation that precedes a data object (such as is in the body of therequest). However, there is the possibility that the full request willnot be sent as a single unit by the server operating system, and theentire request may be received in several units spread over time.Although most requests will be a manageable size (such as a few hundredbytes), other requests may be larger and the operating system may not beable to send all the packets of the entire request together. Moreover,the recording server may have other priorities with other clients (suchas uploading a large file) and this may cause the request to be sent tothe record module in several portions. When a request is received inseveral portions, it is possible that each portion will have a headersection. Further, the body of the request, when it is transmitted, mayalso arrive in multiple portions, and each portion of the body iswritten directly to the data file. The request is cached until all theheaders for that request are received in order to separate the headersection from the body of the request, piece the header back together andwrite the header information to the log file and the data within thebody of the request to the data file. Thus, the request is cached untilthe end of the headers is reached.

The headers are cached for at least two reasons. First, the invention iscapable of determining whether the request is a duplicate request (asoften happens during a Windows® NT® LAN Manager (NTLM) typeauthentication. Second, the invention is capable of ensuring thatinformation used to uniquely identify a user (discussed below) iscompletely in memory.

A determination of whether the end of headers has been reached is made(box 630). If all of the headers have not been received, then the recordmodule continues caching the request (box 640). If all of the headersfrom the request have been received, the record module pieces the headerinformation together and writes that information into the log file (box650).

Immediately after all of the headers have been received the recordmodule searches for a special “cookie.” In general, a cookie can be asmall text file that can contain information or a small piece ofinformation about the client, its user and the user's preferences. Thecookie that the record module searches for is a special cookie that wasplaced there by the record module in order to identify a user makingmultiple requests to the server. Each cookie contains at least a uniquevalue (such as a globally unique identifier (GUID)) to provideidentification for the user. If the cookie does not exist in the requestthen a unique value is assigned to the cookie and the unique value isstored as part of the request in the log file. If the request includes acookie, the unique value corresponding to the cookie is located and theunique value is stored as part of the request in the log file. This ishow the recording module tracks users.

When the recording server sends back a response to the requesting clientthe cookie is also returned with instructions to include the cookie withsubsequent requests. The requesting client then knows that it must senda cookie every time it makes a request to the recording server. Further,an expiration time may be set on the cookie so that the cookie will lastonly as long as the user is logged on.

One advantage of tracking users in this manner is that recording can bedone across a network cluster. In other words, users can be trackedacross a cluster of multiple recording servers. If, for example, duringa user's set of transactions, the user's requests are moved or forwardedto multiple recording servers the unique value assigned to the user willpermit the multiple recording servers to record and uniquely identifythe user. After recording, postprocessing can be performed on the logfile of each of the multiple recording servers in the cluster togenerate a single log file containing all of the requests made by aspecific user in chronological order Alternatively, instead of creatinga single log file the log files of the multiple recording servers may bemerged during playback by the playback module.

The recording module also keeps track of whether the request is from anew socket or an open socket. A socket can be a software object thatconnects an application to a network protocol. For example, a browsercan open a socket that enables it to send and receive messages byreading and writing data to and from the socket. A global socket counteris maintained and every time a request is made the global socket counteris advanced. In addition, a per socket request counter is maintained sothat during playback the order and socket that the request was receivedon can be determined. Thus, the per socket request counter tracks andlogs the socket number and the number of times that particular sockethas been accessed. Further, when a socket is closed the socket numberand the unique value associated with that socket number are tracked andlogged along with the time.

Another feature of the recording module is that a server status code istracked for each request. When the server status code cannot bedetermined (such as during the writing of the body of the request to thedata file) a status value (such as—1) is entered in the server statuscode field. When the correct server status code becomes available thestatus value is overwritten by the correct server status code. Thisfeature is useful for troubleshooting the network. For example, if theserver operating system fails unexpectedly the request that caused thefailure can be found by searching the log file for the status value. Theearliest request that has a status value written in the server statuscode field is likely the request that caused the failure, and at aminimum indicates the area where the request that caused the errorresides.

Once all of the headers have been received the record module then beginswriting the body of request and other incoming data from that request tothe data file (box 660). The record module then determines if all of thedata from the request has been received (box 670). If not, then thefurther incoming data is written to the data file. Otherwise, the recordfor that request is closed within the data file (box 680).

An optional feature that may be included on the record module is logfile rolling and termination. Recording of the requests being receivedby the recording server can occupy large amounts of memory and canimpose serious burdens on the memory storage capabilities of therecording server. The log restriction/rolling module 440 provides anoption to the user that allows the user to specify a time limit and asize limit on the data collector file to preserve memory resources. Thefile may either be deleted or closed and moved to another storage area(such as another machine or another hard drive).

Playback Module

Structural Overview

In general, the playback of the present invention plays back on a clientmachine a recording made on a recording server. The playback moduleallows a single client to simulate multiple clients by playing back arecording of multiple client on the single client. Further, the requestscontained on the recording may be “time-compressed” so that playbackspeed is increased. Speeding up playback may be used to stress theserver being tested and determine its limits.

FIG. 7 is a detailed block diagram illustrating the playback module ofthe network simulation system shown in FIG. 3. The data collector file460, which includes the log file 470 (containing header and trackinginformation) and the data file 480 (containing request data), isaccessed by a data collector file reader 700. The data collector filereader 700 is a tool that reads a single record from the data collectorfile 460 and passes the record to a controller 710. The controller 710includes a controller mapping table 720 to determine which client shouldbe sent a specific request. As noted above, using the network simulationsystem of the present invention a single client can simulate multipleusers.

The controller 710 sends requests to the client 264 until the requestcache 730 of the client 264 is either filled or the controller 710 runsout of data. In addition, a client mapping table 740 is maintained onthe client 264 for use in determining when a user has not made a requestfor a period of time. This information may be used to time out a user inorder to free the resources used by the client machine in simulatingthat user. Timing out a user can mean that the user is removed from alist (such as a mapping table) after a period of inactivity. Both thecontroller mapping table and the client mapping table are preferablyhash tables that contain the necessary mapping information.

Operational Overview

FIG. 8 is a detailed flow diagram of the operation of the playbackmodule shown in FIG. 7. At the start of playback (box 800) the datacollector file reader 700 begins reading a single record from the datacollector file 460 (box 810). The playback module 280 then determines,by reading the unique value (such as a GUID) which user sent the requestcontained in the record. When the user is established, the playbackmodule 280 determines whether the user is in the controller mappingtable 720 (box 820).

The controller mapping table 720 maps a user to a client machine. Thisis necessary to avoid the situation where more than one machine isplaying back requests from the same user. For example, many HTTP serverskeep state information on users (based on some cookie value) thusnecessitating that recordings made by the present invention be playedback on the same client machine. The controller mapping table 720, whichis preferably a hash table, takes into account the number of clientmachines available and then generates a table that assigns a clientmachine to a particular user. All requests from this user are sent tothat specific client machine. One advantage this feature provides isautomatic load balancing between the client machines. This allowsplayback to be more efficient and improves the fidelity of the playbackto the original recording.

If the user is not in the controller mapping table 720, the playbackmodule 280 assigns the user to a client machine (box 830). An entry inthe controller mapping table 720 is then created that maps the user totheir associated client machine (box 840). After a user mapping ispresent the controller mapping table 720 is used to map the user to theassociated client machine (box 850). The controller 710 sends the recordto the request cache 730 of the client 264 (box 860) and keeps adding tothe request cache 730 of the client 264 even while the client 264 isplaying back. After receiving a notification to start from thecontroller 710 the client 264 begins sending request to the testingserver 256. After the client has played back the data in the requestcache 730 the data may either be discarded or overwritten by incomingdata. When the end of the data collector file 460 is reached thecontroller 710 sends out an end of data file message to the clients.

Users who have not made a request for a period of time (or users whohave “timed out”) are determined dynamically by the playback module 280.In particular, the controller 710 examines the client mapping table 740at a regular interval to determine whether a request has been made by auser within the time period. The client mapping table 740, which ispreferably a hash table, maps a user to the time the last request wasmade by that user. Using the client mapping table 740, the playbackmodule 280 can determine whether the user has made a request during atime period. If not, then the user is deleted from system. This featureincreases system performance and preserves client resources. Inaddition, it is more efficient to keep track of users who have timed outon the client machines rather than the server, because the server is notslowed down and it is less costly to acquire more clients rather thanservers.

The playback module 280 also closes sockets when instructed to by thedata collector file 460. Although socket closure is tracked by therecording server 208 and not determined dynamically during playback, anytime a notification of socket closure that was recorded on the recordingserver 208 is received by the playback module 280 that socket is closed.

V. Working Example

The following working example is only one exemplary illustration of howthe present invention may be implemented. Those skilled in the art willrecognize that several other implementations of the present inventionare possible. In this working example, the system and method of thepresent invention uses a global filter to record request received by anInternet Information Server (IIS) server and play the recording backagainst the same or another IIS server. The global filter is capable ofrecording a request from any IP address and any virtual directory to theIIS server.

In this working example, an Internet Server Application ProgramInterface (ISAPI) global filter was used on a recording server to recordnetwork characteristics. The ISAPI global filter was implemented intoIIS between the IIS port handling and the IIS processing layers. Thefilter registered as a medium with IIS so that the filter got calledafter any ISAPI dynamic link libraries (DLLs) that were registered as ahigh. For requests received, objects, registered as a high get calledfirst by IIS, then those registered as medium are called, and so on. Forrequest being sent out the objects are called in reverse order. Oneexample of an ISAPI DLL that may register as a high is SSL. Byregistering as a medium with IIS the ISAPI global filter of the presentinvention received the raw data after SSL had decrypted the data.

When the ISAPI global filter registered itself with IIS, severalfeatures were enabled so that IIS notified the filter upon theoccurrence of certain events. In this example, the filter registered tobe notified whether the request came from a secure or non-secure port.Requests from a non-secure port have a certain port number associatedwith the request. Similarly, requests from a secure port (such as aSecure Socket Layer (SSL) or a Secure HyperText Transfer Protocol(S-HTTP) request) have another number associated with them. The filteralso registered to be notified when raw data arrived at a port (eithersecure or non-secure). Because of the way the ISAPI global filter wasimplemented into IIS the ISAPI global filter actually got called beforeIIS began processing the data. This feature can be useful fortroubleshooting the network because by examining the log file it can bedetermined at what time a network problem occurred and what request mayhave caused the network problem.

The ISAPI global filter also registered with IIS to be notified ofserver status codes, socket terminations, socket that were being openedand port numbers. When a request was received by IIS, the ISAPI globalfilter was notified and given the raw data from the port. The requestwas then cached until all of the header information was received. Thenthe header information was written to the log file. When all of theheaders were received, the header information was time-stamped andwritten to the log file. The time stamps were relative to when IISstarted. In addition, port number, socket number, client IP address andthe server status code were also written to the log file.

After all the headers were received, the remainder of the incoming datawas written to the data collector file. Two files were created: the logfile, which holds the initial (or header) request data, and the datafile, which holds any data beyond the initial request data. The formatof the log file included the port the request was received on and theuser identification. The user identification is a GUID that uniquelydefines the user. In addition, the log file included the server IPaddress, the socket number the request as received on, theidentification of the request made on a socket, the time the request wasreceived and the server status code.

The body offset value (in relation to the rest of the request) was alsowritten in the log file. If the body offset is a non-zero value thisindicates that the data was received in more that one portion. The bodyoffset is written at the end of the data and contains the offset to thenext portion of data. The body offset is used so that if additional dataassociated with a certain request is received after the data is writtenit can be easily appended. In addition, during playback the datacollector file reader can go easily piece together sections of databelonging to the same user. The data file format also includes an offsetvalue and is written in a similar manner. When the recording wasfinished both the log and data files were closed and were ready forplayback on a client machine.

The foregoing description of the preferred embodiments of the inventionhas been presented for the purposes of illustration and description. Itis not intended to be exhaustive or to limit the invention to theprecise form disclosed. Many modifications and variations are possiblein light of the above teaching. It is intended that the scope of theinvention be limited not by this detailed description of the invention,but rather by the claims appended hereto.

1. A network simulation system for simulating network characteristics,comprising: a record module having a filter that resides on a server andrecords network characteristics; a data collector file that stores therecorded network characteristics for playback on a playback machine. 2.The network simulation system of claim 1, wherein the record modulecomprises a filter that captures network data from a host environment.3. The network simulation system of claim 2, wherein the filter is aglobal filter.
 4. The network simulation system of claim 2, wherein thefilter is implemented into an operating system of the server.
 5. Thenetwork simulation system of claim 4, wherein the filter is implementedbetween a port handling module, which scans a port for incoming networkdata, and a processing module, which processes the network data.
 6. Thenetwork simulation system of claim 1, wherein the record modulecomprises a log restriction/rolling module that is capable of limiting asize of the data collector file that stores the recorded networkcharacteristics.
 7. The network simulation system of claim 6, whereinthe log restriction/rolling module limits the size of the data collectorfile by at least one of: (a) deleting at least a portion of the datacollector file; (b) moving at least of portion of the data collectorfile to another machine.
 8. The network simulation system of claim 1,wherein the data collector file comprises a log file, which storesheader and tracking information, and a data file, which stores othertypes of data.
 9. The network simulation system of claim 8, furthercomprising a caching module that caches at least a portion of incomingnetwork data and subsequently writes the cached data to the log file.10. The network simulation system of claim 1, further comprising aplayback module that resides on the playback machine and plays back therecorded network characteristics.
 11. The network simulation system ofclaim 10, wherein the playback machine is a client and the recordednetwork characteristics are played back to a testing server.
 12. Thenetwork simulation system of claim 10, wherein the playback modulecomprises a data collector file reader that reads at least a portion ofthe recorded network characteristics stored in the data collector file.13. The network simulation system of claim 12, wherein the datacollector file comprises a log file, which stores header information,and data file, which stores other network data.
 14. The networksimulation system of claim 11, wherein the testing server is connectedto at least one other client and the playback module comprises acontroller and a controller mapping table that determines to whichclient the testing server should send a played back request.
 15. Thenetwork simulation system of claim 11, wherein the testing server isconnected to at least one other client and each client comprises aclient mapping table that is used to time out a user.
 16. A networksimulation system for playing back recorded network characteristics,comprising: a data collector file that contains network data that hasbeen recorded by a filter that resides on a recording server; and aplayback module that resides on a playback machine and plays back thedata collector file; wherein the network data is sent by the playback toa testing server to simulate network characteristics on the testingserver.
 17. The network simulation system of claim 16, wherein thenetwork data includes header data and the data collector file comprisesa log file, which stores he header data, and a data file, which storesthe remainder of the network data.
 18. The network simulation system ofclaim 16, wherein the playback machine is a client machine incommunication with the testing server.
 19. The network simulation systemof claim 18, wherein the playback module comprises a data collector filereader capable of accessing the network data within the data collectorfile.
 20. A method of simulating computer network characteristics on atesting server, comprising: recording network data using a filterresiding on a recording server; storing the recorded network data; andplaying back the recorded network data on a playback machine incommunication with the testing server.
 21. The method of claim 20,wherein recording comprises capturing the network data from a hostenvironment of the recording server.
 22. The method of claim 21, whereinrecording further comprises caching the captured network data prior tostoring the network data.
 23. The method of claim 22, wherein thenetwork data comprises header data and body data and network data iscached until all the header data has been captured.
 24. The method ofclaim 20, wherein the network data comprises header data and body dataand the recorded network data is stored in a data collector filecomprising a log file, which stores the header data, and a data file,which stores the body data.
 25. The method of claim 24, wherein theheader data is cached until all of the header data has been recorded andthe cached header data is stored in the log file.
 26. The method ofclaim 24, wherein recording comprises assigning a unique value to eachuser in communication with the recording server to identify the user.27. The method of claim 26, wherein the unique value is stored in thelog file.
 28. The method of claim 20, further comprising trackingnetwork information from the recording server.
 29. The method of claim28, wherein the network information includes at least one of: (a) a userthat sent a request; (b) what time a request was sent by a user; (c)when a socket was opened; (d) when a socket was closed; (e) a statuscode of the recording server.
 30. The method of claim 20, wherein theplayback machine is a client machine.
 31. The method of claim 30,wherein the testing server is in communication with a second client andplaying back comprises using a controller mapping table to assign a userto a client such that all recorded network data from the user is playedback on the same client.
 32. The method of claim 30, wherein the clientmachine can simulate multiple users by playing back the recorded networkdata.
 33. A computer-readable medium having computer-executableinstructions for performing the method recited in claim
 20. 34. Anetwork simulation system for recording network characteristics of acomputer network, comprising: a record module located on a server on thecomputer network; and a custom-generated log file generated by therecord module that stores the recorded network characteristics; whereinthe custom-generated log file is not a server log file of the server.